package com.course.testng;

import org.testng.annotations.Test;

public class ExceptionTest {
    // 期望结果为某一个异常
    @Test(expectedExceptions = RuntimeException.class)
    public void runTimeExceptionFail() {
        System.out.println("这是一个失败的异常测试");
    }

    @Test(expectedExceptions = RuntimeException.class)
    public void runTimeExceptionSuccess() {
        System.out.println("这是一个成功的异常测试");
        throw new RuntimeException();
    }
}
